package com.groupbuying.currency.consumer.connector;

import com.groupbuying.currency.consumer.utils.apiresult.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;


/**
 * @anthor zmlmagic
 * @date 2019/1/10 5:45 PM
 * @company 蒙泰互联网公司
 **/

@Service
@FeignClient(name = "service-sysconfig")
public interface SysconfigFeign {
    @RequestMapping(value = "/api/segment/get/leaf", method = RequestMethod.GET)
    String getUuidByLeaf();

    /* 积分中心-生成活动id */
    @RequestMapping(value = "/common/currency/createActivityId", method = RequestMethod.GET)
    String createActivityID();

    /* 积分中心-生成日志id */
    @RequestMapping(value = "/common/currency/createLogId", method = RequestMethod.GET)
    String createLogID();

    /* 积分中心-根据ruleId获取运营规则 */
    @RequestMapping(value = "/opexRule/getRule", method = RequestMethod.GET)
    Map getRuleByIdAndDelFlag(@RequestParam Map<String, Object> params);

    /*积分中心--发送微信小程序模版*/
    @PostMapping("/notify/weChatMiniApp")
    ApiResult doWechatMiniTemplateSend(@RequestParam Map<String,Object> params);


    /*积分中心--发送支付宝小程序模版*/
    @PostMapping("/notify/aliMiniApp")
    ApiResult doAlipayMiniTemplateSend(@RequestParam Map<String,Object> params);

}
